﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="app.aspx.cs" Inherits="Html5.app" %>

<!DOCTYPE html >
<html>
<head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="description" content="快先森骑士app下载">
    <meta name="keywords" content="快先森,骑士,app下载">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta content="email=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <script src="javascript/jquery.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/app.css">
    <title><%= SectionProxyData.GetSetValue(2) %>骑士app下载</title>
</head>

<body>
    <div id="content">

        <script type="text/javascript">

            var androidurl = "http://test.aaa.com/app/KXSForDeliver.apk";
            var iosurl = "https://itunes.apple.com/cn/app/kuai-xian-sen-qi-shi/id1123442428?mt=8"

            /*
             * 智能机浏览器版本信息:
             *
             */

            $(function () {
                var browser = {
                    versions: function () {
                        var u = navigator.userAgent, app = navigator.appVersion;
                        return {//移动终端浏览器版本信息
                            trident: u.indexOf('Trident') > -1, //IE内核
                            presto: u.indexOf('Presto') > -1, //opera内核
                            webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
                            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
                            mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //是否为移动终端
                            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                            android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
                            iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
                            iPad: u.indexOf('iPad') > -1, //是否iPad
                            webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
                        };
                    }(),
                    language: (navigator.browserLanguage || navigator.language).toLowerCase()
                }


                if (isWeiXin()) {
                    if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
                        var url = iosurl;
                        if (url.indexOf("qq.com") >= 0) {
                            window.location.href = iosurl;
                        } else {
                            $("#ios_tips").show();
                        }
                    } else {
                        var url = androidurl;
                        if (url.indexOf("qq.com") >= 0 && url.indexOf("apk") < 0) {
                            window.location.href = androidurl;
                        } else {
                            $("#android_tips").show();
                        }
                    }

                } else if (isWeibo()) {
                    if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
                        $("#weibo_tips_ios").show();
                    } else {
                        $("#weibo_tips_android").show();
                    }
                } else if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
                    window.location.href = iosurl;
                }
                else if (browser.versions.android) {
                    window.location.href = androidurl;
                }
                else {
                    window.location.href = androidurl;
                }

            })

            function isWeiXin() {
                var ua = window.navigator.userAgent.toLowerCase();
                if (ua.match(/MicroMessenger/i) == 'micromessenger') {
                    return true;
                } else {
                    return false;
                }
            }

            function isWeibo() {
                var ua = navigator.userAgent.toLowerCase();
                if (ua.match(/weibo/i) == "weibo") {
                    // alert('weibo');
                    return true;
                } else {
                    return false;
                }
            }

        </script>
        <div class="tip_wrap">
            <img id="ios_tips" src="/images/weixin_ios1122.jpg" class="wxtip tip_ios" style="/* display: none */">
            <img id="android_tips" src="/images/weixin_android1122.jpg" class="wxtip tip_android" style="display: none">
            <div id="weibo_tips_ios" name="weibo_tips_ios" class="weibo_tips_ios" style="display: none; text-align: center; padding-top: 20px;"><span style="color: black; font-size: 17px;">请点击右上角,用Safari打开,下载应用</span></div>
            <div id="weibo_tips_android" class="weibo_tips_android" style="display: none; padding-top: 20px; text-align: center;"><span style="color: black; font-size: 17px;">请点击右上角,在浏览器中打开,下载应用</span></div>
        </div>

        <span>111请点击右上角,在浏览器中打开,下载应用</span>

    </div>



</body>
</html>
